package com.cdgeekcamp.redas.wechat.entity;

import com.cdgeekcamp.redas.wechat.service.MsgHandlerService;

/**
 * 文本消息
 */
public class TextMessageEntity extends MessageBaseEntity {
    // 文本内容
    private String Content;
    // 消息id
    private Long MsgId;

    public TextMessageEntity() {
    }

    public TextMessageEntity(String fromUserName, String toUserName, Long createTime, String msgType) {
        super(fromUserName, toUserName, createTime, msgType);
    }

    public TextMessageEntity(String content, Long msgId) {
        Content = content;
        MsgId = msgId;
    }

    public TextMessageEntity(String fromUserName, String toUserName, Long createTime, String msgType, String content, Long msgId) {
        super(fromUserName, toUserName, createTime, msgType);
        Content = content;
        MsgId = msgId;
    }

    public String getContent() {
        return Content;
    }

    public void setContent(String content) {
        Content = content;
    }

    public Long getMsgId() {
        return MsgId;
    }

    public void setMsgId(Long msgId) {
        MsgId = msgId;
    }

    @Override
    public String doReply() {
        return new MsgHandlerService().textHandler(this);
    }
}
